<template>
  <div style="background: #fff;height: 100vh">
    <div class="errPage-container">
      <el-button
        icon=" arrow-left"
        class="pan-back-btn"
        @click="back"
      >
        返回
      </el-button>
      <el-row>
        <el-col :span="12">
          <h1 class="text-jumbo text-ginormous">
            Oops!
          </h1>
          <h2>你没有权限去该页面</h2>
          <h6 style="margin:28px 0">
            如有不满请联系你领导
          </h6>
          <ul class="list-unstyled">
            <li>或者你可以去:</li>
            <li>
              <router-link to="/">
                回首页
              </router-link>
            </li>
            <li>
              <a
                href="#"
                @click.prevent="dialogVisible=true"
              >
                点我看图
              </a>
            </li>
          </ul>
        </el-col>
        <el-col :span="12">
          <img
            src="https://img-1258125771.cos.ap-beijing.myqcloud.com/401.089007e7.gif"
            width="313"
            height="428"
            alt="Girl has dropped her ice cream."
          >
        </el-col>
      </el-row>
      <el-dialog
        :visible.sync="dialogVisible"
        title="随便看"
      >
        <img
          :src="ewizardClap"
          class="pan-img"
        >
      </el-dialog>
    </div>
  </div>
</template>

<script>
  import errGif from '@/assets/img/401.gif'

  export default {
    name: 'Page401',
    data () {
      return {
        errGif: errGif + '?' + +new Date(),
        ewizardClap: 'https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646',
        dialogVisible: false
      }
    },
    methods: {
      back () {
        if (this.$route.query.noGoBack) {
          this.$router.push('/')
        } else {
          this.$router.go(-1)
        }
      }
    }
  }
</script>

<style scoped>
  .text-ginormous{
    margin: 40px 0;
  }
  .errPage-container {
    width: 800px;
    max-width: 100%;
    margin: 0 auto;
    padding-top: 150px;
  }
  .errPage-container .pan-back-btn {
    background: #409EFF;
    color: #fff;
    border: none !important;
  }
  .errPage-container .pan-gif {
    margin: 0 auto;
    display: block;
  }
  .errPage-container .pan-img {
    display: block;
    margin: 0 auto;
    width: 100%;
  }
  .errPage-container .text-jumbo {
    font-size: 60px;
    font-weight: 700;
    color: #484848;
  }
  .errPage-container .list-unstyled {
    font-size: 14px;
    padding-left: 40px;
  }
  .errPage-container .list-unstyled li {
    padding-bottom: 5px;
    list-style:outside
  }
  .errPage-container .list-unstyled a {
    color: #409EFF;
    text-decoration: none;
  }
  .errPage-container .list-unstyled a:hover {
    text-decoration: underline;
  }
</style>
